/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Hernan
 */
@Entity
@Table(name = "diabetico")
@NamedQueries({@NamedQuery(name = "Diabetico.findByIdDiabetico", query = "SELECT d FROM Diabetico d WHERE d.idDiabetico = :idDiabetico"), @NamedQuery(name = "Diabetico.findByTipo", query = "SELECT d FROM Diabetico d WHERE d.tipo = :tipo"), @NamedQuery(name = "Diabetico.findByFechaEnfermedad", query = "SELECT d FROM Diabetico d WHERE d.fechaEnfermedad = :fechaEnfermedad"), @NamedQuery(name = "Diabetico.findByDieta", query = "SELECT d FROM Diabetico d WHERE d.dieta = :dieta"), @NamedQuery(name = "Diabetico.findByTalla", query = "SELECT d FROM Diabetico d WHERE d.talla = :talla"), @NamedQuery(name = "Diabetico.findByImc", query = "SELECT d FROM Diabetico d WHERE d.imc = :imc"), @NamedQuery(name = "Diabetico.findByUltimoExamen", query = "SELECT d FROM Diabetico d WHERE d.ultimoExamen = :ultimoExamen"), @NamedQuery(name = "Diabetico.findByCuidadosPrevios", query = "SELECT d FROM Diabetico d WHERE d.cuidadosPrevios = :cuidadosPrevios")})
public class Diabetico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE)
    @Column(name = "idDiabetico", nullable = false)
    private Integer idDiabetico;
    @Column(name = "tipo")
    private String tipo;
    @Column(name = "fechaEnfermedad")
    
    private String fechaEnfermedad;
    @Column(name = "dieta")
    private String dieta;
    @Column(name = "talla")
    private String talla;
    @Column(name = "imc")
    private String imc;
    @Column(name = "ultimoExamen")
    
    private String ultimoExamen;
    @Column(name = "cuidadosPrevios")
    private String cuidadosPrevios;
    @OneToMany(mappedBy = "idDiabetico")
    private Collection<Paciente> pacienteCollection;

    public Diabetico() {
    }

    public Diabetico(Integer idDiabetico) {
        this.idDiabetico = idDiabetico;
    }

    public Integer getIdDiabetico() {
        return idDiabetico;
    }

    public void setIdDiabetico(Integer idDiabetico) {
        this.idDiabetico = idDiabetico;
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        this.tipo = tipo;
    }

    public String getFechaEnfermedad() {
        return fechaEnfermedad;
    }

    public void setFechaEnfermedad(String fechaEnfermedad) {
        this.fechaEnfermedad = fechaEnfermedad;
    }

    public String getDieta() {
        return dieta;
    }

    public void setDieta(String dieta) {
        this.dieta = dieta;
    }

    public String getTalla() {
        return talla;
    }

    public void setTalla(String talla) {
        this.talla = talla;
    }

    public String getImc() {
        return imc;
    }

    public void setImc(String imc) {
        this.imc = imc;
    }

    public String getUltimoExamen() {
        return ultimoExamen;
    }

    public void setUltimoExamen(String ultimoExamen) {
        this.ultimoExamen = ultimoExamen;
    }

    public String getCuidadosPrevios() {
        return cuidadosPrevios;
    }

    public void setCuidadosPrevios(String cuidadosPrevios) {
        this.cuidadosPrevios = cuidadosPrevios;
    }

    public Collection<Paciente> getPacienteCollection() {
        return pacienteCollection;
    }

    public void setPacienteCollection(Collection<Paciente> pacienteCollection) {
        this.pacienteCollection = pacienteCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDiabetico != null ? idDiabetico.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Diabetico)) {
            return false;
        }
        Diabetico other = (Diabetico) object;
        if ((this.idDiabetico == null && other.idDiabetico != null) || (this.idDiabetico != null && !this.idDiabetico.equals(other.idDiabetico))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.Diabetico[idDiabetico=" + idDiabetico + "]";
    }

}
